

<div ng-if="qTpl.Type == 'checkbox' || qTpl.Type == 'radio' " class="post row form-inline">
    <h3>[[qTpl.Text]]</h3>
    <div ng-repeat="a in qTpl.Answers" class="col-md-4 form-group">
        <label class="[[qTpl.Type]]" >
            <input ng-if="qTpl.Type == 'checkbox' " type="checkbox" ng-model="q.Choices[a.Id].Checked " ng-change="printAnswer()" />
            <input ng-if="qTpl.Type == 'radio' " type="radio" ng-model="q.Single" ng-value="[[a.Id]]" ng-change="printAnswer()" />
            [[a.Text]] 
            <input ng-if="a.WithText" ng-required="a.Required" placeholder="[[a.Tip]]" type="text" ng-model="q.Choices[a.Id].Text" value="q.Choices[a.Id].Text" style="width:150px" class="form-control" />
        </label>
    </div>
</div>


<div ng-if="qTpl.Type == 'select' " class="row post form" >
    <label for="select" class="col-md-4" >
        <h3>[[qTpl.Text]]</h3>

        <select ng-model="q.Single" class="form-control"> 
            <option value="" ></option>
            <option ng-repeat="a in qTpl.Answers" ng-selected="q.Single == a.Id" value="[[a.Id]]">[[a.Text]]</option>
        </select>
    </label>
</div>

<div ng-if="qTpl.Type == 'text' " class="row post" >
    <h3>[[qTpl.Text]]</h3>
    <div class="" role="form">
        <div ng-repeat="a in qTpl.Answers" class="form-group">
            <div class="[[a.Length == 'long' ? 'col-md-12': 'col-md-4'  ]]">
                <label >[[a.Text]]</label>
                <textarea ng-if="a.Length == 'long' " rows="2" ng-model="q.Choices[a.Id].Text" class="form-control" /> 
                <input ng-if="a.Length != 'long' " ng-model="q.Choices[a.Id].Text" class="form-control" /> 
            </div>
        </div>
    </div>
</div>

